<!DOCTYPE html>
<html>
<head>
{include file="common/head"}
</head>

<body style="background-color: #f2f2f2;">
{include file="common/header"}
<div class="layui-container" style="margin-top: 80px;">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md12">
      <div class="layui-card">
        <div class="layui-card-header"><i class="layui-icon {$topic.icon}"></i> {$topic.name}</div>
        <div class="layui-card-body">
          暂无介绍
        </div>
      </div>
    </div>
  </div>
</div>


<div class="layui-container">
  <div class="layui-row layui-col-space15">
    <!--ls-->
    <div class="layui-col-md8">
      <div class="layui-card">
      <div class="layui-card-body">
      <div class="layui-tab layui-tab-brief" style="margin-bottom: 0;">
          <ul class="layui-tab-title">
            <li{if $type eq 'question'} class="layui-this"{/if}><a href="{:url('wendasns/topic/show',['tags'=>$topic.name])}">问题</a></li>
            <li{if $type eq 'article'} class="layui-this"{/if}><a href="{:url('wendasns/topic/show',['tags'=>$topic.name,'type'=>'article'])}">文章</a></li>
          </ul>
          <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
          {volist name="logs" id="item" empty="<li>暂无数据</li>"}
          	<div class="list-item">
              {if $type eq 'question'}
              <div class="list-item-title"><a href="{:url('wendasns/question/show',$item)}">{$item.title}</a></div>
              <div class="" style="font-size: 12px;">
                <span>{:range_time($item.create_time)}</span> - 
                <a href="{:url('wendasns/home/index',['id'=>$item.user_id])}" link="">{$item.users.username}</a>
                <span style="float: right;">{$item.answer} 回答</span>
              </div>
              {else}
              	<div class="list-item-title"><a href="{:url('wendasns/article/show',$item)}">{$item.title}</a></div>
	              <div class="" style="font-size: 12px;">
	                <span>{:range_time($item.create_time)}</span> - 
	                <a href="{:url('wendasns/home/index',['id'=>$item.user_id])}" link="">{$item.users.username}</a>
	                <span style="float: right;">{$item.comment} 评论</span>
	              </div>
              {/if}
            </div>
            <hr>
            {/volist}
          <div class="pager">{$logs->render()|raw}</div>
          </div>
          </div>
      </div>
      </div>
      </div>
    </div>
    <!--le-->
    
    <!--rs-->
    <div class="layui-col-md4">
      {include file="common/right"}
    </div>
    <!--re-->
  </div>
</div>
{include file="common/footer"}
</body>
</html>
